DBPATH = './database'
DBNAME = 'fetionservice.db'
DATABASE = '%s/%s' %(DBPATH, DBNAME)

#TABLES
REGINFO_TBL = 'reginfo_tbl'
#MOBILE_TBL = 'mobiletbl'
STOCK_TBL = 'stock_tbl'

#ATTR
FETION_ID = 'fetion_id'
MOBILE = 'mobile'
PASSWD = 'password'
FETION_URI = 'fetion_uri'
CONFIRM = 'confirm'
STOCK_ID = 'stock_id'
HIGH_PRICE = 'high_price'
LOW_PRICE = 'low_price'
HIGH_MARK = 'high_mark'
LOW_MARK = 'low_mark'

#CMD
CREATE_FETION_TBL = 'CEATE TABLE fetiontbl(id INTEGER PRIMARY KEY AUTOINCREMENT, fetion_id TEXT, mobile TEXT, password TEXT, fetion_uri TEXT, confirm BOOL integer default 0);'
CREATE_STOCK_TBL = 'CREATE TABLE stocktbl(fetion_uri TEXT, stock_id TEXT, high_price TEXT, low_price TEXT, high_mark INTEGER DEFAULT 1, low_mark INTEGER DEFAULT 1, PRIMARY KEY(fetion_uri, stock_id), FOREIGN KEY(fetion_uri) references reginfo_tbl(fetion_uri));'

#REGISTER_TYPE
REG_FETIONID = 'RFetionid'
REG_MOBILE = 'RMobile'
